<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateInviteeTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateInviteeLabel_id}" for="id" />
                    <h:inputText id="id" value="#{inviteeController.selected.id}" title="#{bundle.CreateInviteeTitle_id}" required="true" requiredMessage="#{bundle.CreateInviteeRequiredMessage_id}"/>
                    <h:outputLabel value="#{bundle.CreateInviteeLabel_accepted}" for="accepted" />
                    <h:inputText id="accepted" value="#{inviteeController.selected.accepted}" title="#{bundle.CreateInviteeTitle_accepted}" />
                    <h:outputLabel value="#{bundle.CreateInviteeLabel_declined}" for="declined" />
                    <h:inputText id="declined" value="#{inviteeController.selected.declined}" title="#{bundle.CreateInviteeTitle_declined}" />
                    <h:outputLabel value="#{bundle.CreateInviteeLabel_eventID}" for="eventID" />
                    <h:selectOneMenu id="eventID" value="#{inviteeController.selected.eventID}" title="#{bundle.CreateInviteeTitle_eventID}" required="true" requiredMessage="#{bundle.CreateInviteeRequiredMessage_eventID}">
                        <f:selectItems value="#{eventController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateInviteeLabel_userEmail}" for="userEmail" />
                    <h:selectOneMenu id="userEmail" value="#{inviteeController.selected.userEmail}" title="#{bundle.CreateInviteeTitle_userEmail}" required="true" requiredMessage="#{bundle.CreateInviteeRequiredMessage_userEmail}">
                        <f:selectItems value="#{userController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{inviteeController.create}" value="#{bundle.CreateInviteeSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{inviteeController.prepareList}" value="#{bundle.CreateInviteeShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.CreateInviteeIndexLink}"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
